<template>
  <el-dialog :title="dialogProps.title" :visible.sync="dialogProps.visible" width="800px"
    @open="handleDialogOpen()" v-loading="loading">
    <div slot="title" class="dialog-header">{{ dialogProps.title }}</div>
    <el-tabs :tab-position="tabPosition" style="height: 500px;">
    <el-tab-pane label="基本信息">
        <h4>基本设置</h4>
        <el-form :inline="true" :model="form" class="demo-form-inline" >
        <el-form-item label="员工编号:" label-width="120px" prop="">
            <el-input  placeholder="请输入员工编号" disabled></el-input>
        </el-form-item>
        <el-form-item label="快递员姓名:" prop="" label-width="120px">
            <el-input  placeholder="请输入快递员姓名" disabled ></el-input>
        </el-form-item>
        <el-form-item label="所属机构:" label-width="120px">
            <el-input  placeholder="请输入所属机构" disabled></el-input>
        </el-form-item>
        <el-form-item label="电话:" label-width="120px" prop="">
            <el-input  placeholder="请输入电话"  disabled></el-input>
        </el-form-item>
        <br><hr>
      </el-form>
      <div style="text-align:center">
      <el-button  @click="returnPage">返回</el-button>
      </div>
    </el-tab-pane>
    </el-tabs>
  </el-dialog>
</template>
<script>

export default {
   name: "kdy-detail",
    data() {
    return {
      tabPosition:"left",
      loading: false,
      Model: {

      },
      dialogProps: {
        visible: false,
        action: '',
        title: ''
      },
      form: {

      }
    }
 },
  methods: {
    submitForm(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          if(this.dialogProps.action === 'add') {

          }
        } else {
          return false
        }
      })
    },
     returnPage(){
        window.history.go(0)
      },

    handleDialogClose() {
      this.dialogProps.visible = false
    },
    handleDialogOpen() {
      this.$nextTick(() => {
        this.$refs['Form'].clearValidate()
      })
    },
    outputError(error) {
      console.log(error.response ? error.response : error.message)
      this.loading = false
      this.$message({
        showClose: true,
        message: '出错了，请按F12查看浏览器日志。',
        type: 'error'
      })
    }
  },
   mounted: function() {
    this.$nextTick(() => {
      this.$on('openDetailkdyDialog', function() {
        this.dialogProps.action = 'detail'
        this.dialogProps.title = ''
        this.dialogProps.visible = true
      })
    })
  }
}
</script>

<style>

</style>
